<?php

namespace app\index\controller;

use think\Request;

class Task {
	// 静态数据，不可修改
	private $extractFrameCreatePath = "/task/extractFrame";
	private $transcodeCreatePath = "/task/submit";
	private $processQuryPath = "/task/status";
	private $transcodeSearchPath = "/task/search";
	
	// 创建截帧任务
	public function createExtractFrame(Request $request) {
		return \VodClient::execute ( json_encode ( $request->post () ), $this->extractFrameCreatePath );
	}
	
	// 创建/批量创建转码任务
	public function createTranscodeTask(Request $request) {
		return \VodClient::execute ( json_encode ( $request->post () ), $this->transcodeCreatePath );
	}
	
	// 查询转码任务状态
	public function queryTaskProcess(Request $request) {
		return \VodClient::execute ( json_encode ( $request->post () ), $this->processQuryPath );
	}
	
	// 搜索转码任务
	public function searchTranscodeTask (Request $request) {
		return \VodClient::execute ( json_encode ( $request->post () ), $this->transcodeSearchPath );
	}
	
}
